home *** CD-ROM | disk | FTP | other *** search
- Path: news1.h1.usa.pipeline.com!usenet
- From: grantp@usa.pipeline.com(Pete)
- Newsgroups: comp.lang.c++
- Subject: Re: what happens w/delete called twice ?
- Date: 23 Feb 1996 22:16:10 GMT
- Organization: Kalevi, Inc.
- Message-ID: <4gleba$fog@news1.usa.pipeline.com>
- NNTP-Posting-Host: pipe15.h1.usa.pipeline.com
- X-PipeUser: grantp
- X-PipeHub: usa.pipeline.com
- X-PipeGCOS: (Pete)
- X-Newsreader: Pipeline USA v3.3.0
-
- On Feb 22, 1996 22:24:41 in article <what happens w/delete called twice ?>,
- 'kcc@interaccess.com (kcc)' wrote:
-
-
- >Hello,
- >
- >Can someone tell me... what happens when delete is called twice
- >for the same memory deallocation ie., [.. rest deleted ..]
-
- One way to find out is to write small test program and try
- it out. Should take about the same amount of time as it
- takes to post a question :-)
-
- Anyway, behavior for the second (and subsequent) deletions
- of a memory block is undefined. With many compilers, you
- get a program crash later on down the line and, when done
- unintentionally, can take an enormous amount of time to
- locate and fix. Ask anyone who's been there, done that --
- yup, me too. :-(
-
- --
- Pete Grant
- Kalevi, Inc.
- Software Engineering & development
-